﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace softbasework
{
    internal class a2
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Please input a digit:");
            string s = Console.ReadLine();
            int a = int.Parse(s);
            int i = 2;
            Console.WriteLine("all prime factors:");
            bool b = false;
            while (a > 1)
            {
                while (a % i == 0)
                {
                    a /= i;
                    b = true;
                }
                if (b) Console.WriteLine(i + " ");
                b = false;
                i++;
            }
        }
    }
}
